package com.ling.pl.autoproject.definition.application.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

/**
 * 应用功能
 */
public class ApplicationFeature {
    @Column(name = "APPLICATION_ID", length = 36)
    @ModelProperty(comment = "应用id")
    String applicationId;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "应用功能名称")
    String name;

    @Column(name = "NAME_I18N", length = 150)
    @ModelProperty(comment = "应用功能名称语言资源")
    String nameI18n;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "应用名称代码")
    String code;

    @Column(name = "APPLICATION_VIEW_TYPE", length = 150)
    @ModelProperty(comment = "应用功能类型")
    @Dict(code = "builder.application.applicationViewType", des = "应用视图,打开html,平台预置应用功能,执行JavaScript,自定义")
    String applicationViewType;

    @Column(name = "USER_DATA1", length = 150)
    @ModelProperty(comment = "用户数据1")
    String userDate1;

    @Column(name = "USER_DATA2", length = 150)
    @ModelProperty(comment = "用户数据2")
    String userDate2;

    @Column(name = "REMARK", length = 150)
    @ModelProperty(comment = "备注")
    String remark;

    @Column(name = "OPEN_TYPE", length = 150)
    @ModelProperty(comment = "打开方式")
    @Dict(code = "builder.application.openType", des = "应用容器分页,应用容器弹出,应用容器弹出（模式）,独立网页弹出,顶级页面")
    String openType;

    //应用视图
    @Column(name = "APPLICATION_VIEW_ID", length = 36)
    @ModelProperty(comment = "应用视图id")
    String applicationViewId;

    @Column(name = "VIEW_PARAMS", length = 250)
    @ModelProperty(comment = "打开视图参数")
    String viewParams;

    //打开html
    @Column(name = "URL_PATH", length = 150)
    @ModelProperty(comment = "页面路径")
    String urlPath;

    //平台预置应用功能
    @Column(name = "DEFAULT_VIEW_ID", length = 36)
    @ModelProperty(comment = "平台预置功能")
    String defaultViewId;

    //执行JavaScript
    @Column(name = "JAVASCRIPT", length = 500)
    @ModelProperty(comment = "平台预置功能")
    String javaScript;

}
